package com.hhf.rpa.InputDeviceMonitor.impl1;


import java.util.Date;

/**
 * 实现监控鼠标，超时打开远程文件再关闭，永久亮屏，保持服务启动状态
 */
public class KeyAlive implements Runnable {

    @Override
    public void run() {
        while (true) {
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            if (System.currentTimeMillis() - MainMonitor.last.getTime() >= 10000) {
                    MainMonitor.last = new Date();
            }
        }
    }
}
